package ooday02;

public class ExtendsTest {
    public static void main(String[] args) {
        Student s1 = new Student("哈利波特", 18, "伦敦", "格兰芬多", "001");
        s1.eat();
        s1.sleep();
        s1.sayHi();
        s1.study();
        System.out.println("------------------------");
        Student s2 = new Student("赫敏", 17, "曼彻斯特", "格兰芬多", "007");
        s2.eat();
        s2.sleep();
        s2.sayHi();
        s2.study();
        s2.playWith(s1);
        System.out.println("------------------------");
        Teacher t1 = new Teacher("孔子", 45, "山东曲阜", 100000.0);
        t1.eat();
        t1.sleep();
        t1.sayHi();
        t1.teach(s1);
        t1.teach(s2);
        System.out.println("------------------------");
        Person p1 = new Person("曹操", 45, "安徽亳州");
        Doctor d1 = new Doctor("华佗", 35, "安徽亳州", "外科圣手");
        d1.eat();
        d1.sleep();
        d1.sayHi();
        d1.surgery(p1);

    }
}
